/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package buscaminas;

import java.awt.Canvas;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;


public class time extends Canvas implements Runnable {

    int seg;
    int Min;
    int H;
    int com;
    int ban;

    @Override
    public void paint(Graphics g) {



        g.setFont(new Font(Font.MONOSPACED, Font.BOLD, 25));
        g.setColor(Color.DARK_GRAY);
        g.drawString(H + ":", 10, 20);
        g.drawString(Min + ":", 50, 20);
        g.drawString(seg + "", 90, 20);

    }

    public void run() {
        for(;;){
        if (com == 1) {

            seg++;
            if (seg > 59) {
                seg = 00;
                Min++;
            }
            if (Min > 59) {
                Min = 00;
                H++;

            }
        }
        try {
            Thread.sleep(1000);

        } catch (InterruptedException e) {
           
        }
     

        repaint();
    }
    }
}

class bandera extends Canvas {

    int ban = 10;

    @Override
    public void paint(Graphics g) {


        g.setFont(new Font(Font.MONOSPACED, Font.BOLD, 17));
        g.setColor(Color.DARK_GRAY);
        g.drawString("banderas " + ban, 5, 20);

    }
}
